package com.work.csms.service;

import com.work.csms.dao.Money;
import com.work.csms.mapper.MoneyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MoneyService {

    @Autowired(required = false)
    private MoneyMapper moneyMapper;

    public List<Money> list(Money money) throws Exception {
        return moneyMapper.list(money);
    }

    public Money getMoneyById(Integer id) throws Exception {
        return moneyMapper.getMoneyById(id);
    }

    public void save(Money money) throws Exception {
        moneyMapper.save(money);
    }

    public void update(Money money) throws Exception {
        moneyMapper.update(money);
    }

    public void deleted(Integer id) throws Exception {
        moneyMapper.deleted(id);
    }

}
